package com.zoe.im.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * @author Zoe.Zhang
 * @date 2021/11/03
 * @description
 */
@Configuration
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth.inMemoryAuthentication()
            .withUser("zoe")
            .password("{noop}123")
            .roles("role")
            .and()
            .withUser("jf")
            .password("{noop}123")
            .roles("role");
    }
}
